package com.kgc.sbt.constant;

import java.security.SecureRandom;
import java.util.Random;

/**
 * Created on 2021/6/1.
 * <p>
 * Author: GongMingJie
 * <p>
 * Description: 系统常量类
 */
public class SystemConstant {

    /**
     * 返回成功状态码
     */
    public static final String SYS_RESP_SUCCESS_CODE = "0000";

    /**
     * 返回成功状态说明
     */
    public static final String SYS_RESP_SUCCESS_MSG = "SUCCESS";

    /**
     * 返回失败状态码
     */
    public static final String SYS_RESP_FAIL_CODE = "9999";

    /**
     * 返回失败状态码说明
     */
    public static final String SYS_RESP_FAIL_MSG = "FAIL";

    /**
     * 系统默认分页的页面容量
     */
    public static final int SYS_INIT_PAGE_SIZE = 3;

    /**
     * 系统默认分页的当前页码
     */
    public static final int SYS_INIT_PAGE_NO = 1;


    /**
     * 随机字符串的原始字符集合，数字小写大写字母
     */
    public static final String WXPAY_SYMBOLS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";


    /**
     * 真随机数对象
     */
    public static final Random WXPAY_RANDOM = new SecureRandom();

    /**
     * 系统订单统一前缀标识符
     */
    public static final String WXPAY_ORDER_PREFIX = "T";

    /**
     * 微信统一下单支付标识
     */
    public static final String WXPAY_ORDER_NATIVE_TYPE = "NATIVE";

    /**
     * 微信统一下单签名方式-md5
     */
    public static final String WXPAY_SIGN_TYPE_MD5 = "MD5";

    /**
     * 微信统一下单签名方式-HMAC-SHA256
     */
    public static final String WXPAY_SIGN_TYPE_HMACSHA256 = "HMAC-SHA256";

    /**
     * 微信统一下单签名方式-参数标识
     */
    public static final String WXPAY_FIELD_SIGN = "sign";

    /**
     * 微信统一下单字符集编码
     */
    public static final String WXPAY_ENCODING_UTF8 = "UTF-8";

    /**
     * 微信统一下单返回结果码
     */
    public static final String WXPAY_RETURN_SUCCESS = "SUCCESS";

    /**
     * 同步返回微信支付，回调处理成功
     */
    public static final String WXPAY_RESPONSE_RESULT_SUCCESS = "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";

    /**
     * 同步返回微信支付，回调处理失败
     */
    public static final String WXPAY_RESPONSE_RESULT_FAIL = "<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[NO]]></return_msg></xml>";



}
